package com.wtwd.device.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.wtwd.device.constant.Constant;
import com.wtwd.device.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 *
 * </p>
 *
 * @author zdl
 * @since 2021-09-03
 */
@ApiModel(value = "AppUserTarget对象", description = "")
public class AppUserTarget extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID")
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private Long userId;

    @ApiModelProperty(value = "步数")
    private Integer stepNumber;

    @ApiModelProperty(value = "睡眠(s)")
    private Integer sleep;

    @ApiModelProperty(value = "运动距离(m)")
    private Integer sportDistance;

    @ApiModelProperty(value = "运动时间(s)")
    private Integer sportTime;

    @ApiModelProperty(value = "卡路里(kcal)")
    private Integer sportCalories;


    public AppUserTarget getDefaultObj(Long userId) {
        this.userId = userId;
        this.stepNumber = 10000;
        this.sleep = 7 * Constant.HH_TO_SS;
        this.sportDistance = 5000;
        this.sportTime = 2 * Constant.HH_TO_SS;
        this.sportCalories = 12;
        return  this;
    }

    public Integer getSportCalories() {
        return sportCalories;
    }

    public void setSportCalories(Integer sportCalories) {
        this.sportCalories = sportCalories;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getStepNumber() {
        return stepNumber;
    }

    public void setStepNumber(Integer stepNumber) {
        this.stepNumber = stepNumber;
    }

    public Integer getSleep() {
        return sleep;
    }

    public void setSleep(Integer sleep) {
        this.sleep = sleep;
    }

    public Integer getSportDistance() {
        return sportDistance;
    }

    public void setSportDistance(Integer sportDistance) {
        this.sportDistance = sportDistance;
    }

    public Integer getSportTime() {
        return sportTime;
    }

    public void setSportTime(Integer sportTime) {
        this.sportTime = sportTime;
    }

    @Override
    public String toString() {
        return "AppUserTarget{" +
                "userId=" + userId +
                ", stepNumber=" + stepNumber +
                ", sleep=" + sleep +
                ", sportDistance=" + sportDistance +
                ", sportTime=" + sportTime +
                "}";
    }
}
